"""
@author: 江同学呀
@file: index_prefixes.py
@date: 2024/7/27 23:10
@desc: 
"""
from typing import Dict

from espc.orm.model.base.base import _Base


class IndexPrefixes(_Base):
    """
    todo 补充描述
    """
    def __init__(self, min_chars: float = None, max_chars: float = None, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self._min_chars: float = min_chars
        self._max_chars: float = max_chars
        return

    def _build(self) -> Dict:
        body: Dict[str, float] = {}
        if self._min_chars is not None:
            body["min_chars"] = self._min_chars
        if self._max_chars is not None:
            body["max_chars"] = self._max_chars
        return body

    # def _to_dict(self) -> Dict:
    #     body: Dict[str, float] = {}
    #     if self._min_chars is not None:
    #         body["min_chars"] = self._min_chars
    #     if self._max_chars is not None:
    #         body["max_chars"] = self._max_chars
    #     return body

